'XQLM General Declarations 'Variable names and parameters are attempts at being descriptive. 'The function declarations have parameter names that indicate the 'kind of value that the DLL receives, not the nature of the variable 'you should pass. That is, "lpcursor%" means you are passing the 'integer variable Cursor, but VB actually sends the address as a 'long pointer because you did not pass by value. Also note that 'passing strings by value passes a long pointer to a c-style string, 'not the 'value' of the string. 'These declarations work to some extent but have only begun to be 'tested. You are on your own in using this info, I'm not expert 'enough to be much help. Global LoggedIn As Integer Global ASCIIFlag As Integer Global Bufferlen As Integer Global Cursor As Integer Global DataSize As Integer Global DataType As Integer Global DecPlaces As Integer Global DisplaySize As Integer Global FieldNameCount As Integer Global FieldPosition As Integer Global FieldSpacing As Integer Global JustifyCode As Integer Global MaskLength As Integer Global NameLen As Integer Global OptionCode As Integer Global StatementCount As Integer Global StatementExec As Integer Global StatementLen As Integer Global SubNameLen As Integer Global SubstCount As Integer Global ValTextLen As Integer Global DataPath As String * 64 Global DDPath As String * 64 Global FieldNameList As String * 255 Global FieldName As String * 30 Global Mask As String * 30 Global Password As String * 10 Global ReturnVal As String * 50 Global Statement As String * 255 Global StatusBuffer As String * 10 Global SubVarNames As String * 255 Global SubValueText As String * 255 Global Username As String * 30 Global ValToConvert As String * 50 Global XQLVersionNum As String * 10 Global Const ZERO = 0 Declare Function XQLCompile Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, lpStatementLen%, ByVal lpStatement$) As Integer Declare Function XQLConvert Lib "c:\windows\wxqlcall.dll" (ByVal iOptionCode%, ByVal iDataType%, ByVal iDataSize%, ByVal iDecPlaces%, ByVal iDispSize%, ByVal lpValToConvert$, ByVal lpReturnVal$, ByVal lpMask$, ByVal iJustifyCode%) As Integer Declare Function XQLCursor Lib "c:\windows\wxqlcall.dll" (lpCursor%) As Integer Declare Function XQLDescribe Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, ByVal iFieldPosition%, lpDataType%, lpDataSize%, lpDecPlaces%, lpDispSize%, lpNameLen%, ByVal spFieldName$) As Integer Declare Function XQLExec Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%) As Integer Declare Function XQLFetch Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, ByVal iOptionCode%, lpBufferLen%, lpDataBuffer As Any, lpRecCount&, ByVal iASCIIFlag%, ByVal iFieldSpacing%) As Integer Declare Function XQLFormat Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, ByVal iFieldPosition%, ByVal iMaskLen%, ByVal spMask$) As Integer Declare Function XQLFree Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%) As Integer Declare Function XQLLogin Lib "c:\windows\wxqlcall.dll" (ByVal spUserName$, ByVal spPassword$, ByVal spDDPath$, ByVal spDataPath$, ByVal spReserved$, ByVal iZeroValue%) As Integer Declare Function XQLLogout Lib "c:\windows\wxqlcall.dll" () As Integer Declare Function XQLMask Lib "c:\windows\wxqlcall.dll" (ByVal iOptionCode%, ByVal iDataType%, ByVal iDataSize%, ByVal iDecPlaces%, lpMaskLen%, ByVal lpMask$) As Integer Declare Function XQLSPUtility Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, ByVal iOptionCode%, lpStatementCount%, lpStatementExec%, lpBufferLen%, lpDataBuffer As Any) As Integer Declare Function XQLStatus Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, ByVal iOptionCode%, ByVal lpStatusBuffer$) As Integer Declare Function XQLStop Lib "c:\windows\wxqlcall.dll" () As Integer Declare Function XQLSubst Lib "c:\windows\wxqlcall.dll" (ByVal CursorID%, ByVal iSubstCount%, ByVal iSubNameLen%, ByVal lpSubVarNames$, ByVal iValTextLen%, ByVal lpSubValueText$) As Integer Declare Function XQLValidate Lib "c:\windows\wxqlcall.dll" (lpFieldNameCount%, ByVal lpFieldNames$, ByVal iBufferlen%, lpDataBuffer As Any) As Integer Declare Function XQLVersion Lib "c:\windows\wxqlcall.dll" (ByVal lpXQLVersion$) As Integer